package com.tc.vms.kafka;

import com.tc.vms.MessageWrap;
import com.tc.vms.VMSEventArgs;

public class KafkaEventArgs extends VMSEventArgs {

    private long offset;
    private int partition;

    private String topicName;

    public KafkaEventArgs() {
        super();
    }

    public KafkaEventArgs(MessageWrap message) {
        super(message);
    }

    public int getPartition() {
        return partition;
    }

    public void setPartition(int partition) {
        this.partition = partition;
    }

    public String getTopicName() {
        return topicName;
    }

    public void setTopicName(String topicName) {
        this.topicName = topicName;
    }

    public long getOffset() {
        return offset;
    }

    public void setOffset(long offset) {
        this.offset = offset;
    }

    public static KafkaEventArgs createProgress(String topic, int partition, long offset) {
        KafkaEventArgs arg = new KafkaEventArgs();
        arg.setTopicName(topic);
        arg.setPartition(partition);
        arg.setOffset(offset);
        return arg;
    }

}
